from functools import reduce
def f(x,y):
    if x.isdigit() and y.isdigit():
        return x + y
    elif x.isdigit():
        return x
    elif y.isdigit():
        return y

lst = ['a', '1', '2bb', '234', '', '9']
result = reduce(f,lst)
print(result)
